HAL RNG Types ¶
HAL RNG Types ¶
- group RNG_Exported_Types
-
Typedefs
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t
¶
-
RNG Handle Type Definition
-
typedef
void
(
*
hal_rng_cb_t
)
(
hal_rng_handle_t
*
hrng
)
¶
-
Pointer to an RNG callback function.
Enums
-
enum
hal_rng_state_t
¶
-
RNG global state.
Values:
-
enumerator
HAL_RNG_STATE_RESET
¶
-
RNG not yet initialized
-
enumerator
HAL_RNG_STATE_INIT
¶
-
RNG initialized and not yet configured
-
enumerator
HAL_RNG_STATE_IDLE
¶
-
RNG initialized and configured
-
enumerator
HAL_RNG_STATE_ACTIVE
¶
-
RNG random number generation is ongoing
-
enumerator
HAL_RNG_STATE_ERROR
¶
-
RNG seed error is detected
-
enumerator
HAL_RNG_STATE_RESET
¶
-
enum
hal_rng_clock_error_detection_status_t
¶
-
RNG clock error detection state.
Values:
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
¶
-
Clock error detection enabled RNG clock error detection enabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_DISABLED
¶
-
0x00000020 Clock error detection Clock error detection disabled RNG clock error detection disabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
¶
-
enum
hal_rng_clock_divider_t
¶
-
RNG clock divider.
Values:
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
¶
-
No clock division RNG 1 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2
¶
-
2 RNG clock cycles per internal RNG clock RNG 2 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4
¶
-
4 RNG clock cycles per internal RNG clock RNG 4 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8
¶
-
8 RNG clock cycles per internal RNG clock RNG 8 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16
¶
-
16 RNG clock cycles per internal RNG clock RNG 16 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32
¶
-
32 RNG clock cycles per internal RNG clock RNG 32 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_64
¶
-
64 RNG clock cycles per internal RNG clock RNG 64 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_128
¶
-
128 RNG clock cycles per internal RNG clock RNG 128 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_256
¶
-
256 RNG clock cycles per internal RNG clock RNG 256 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_512
¶
-
512 RNG clock cycles per internal RNG clock RNG 512 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1024
¶
-
1024 RNG clock cycles per internal RNG clock RNG 1024 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2048
¶
-
2048 RNG clock cycles per internal RNG clock RNG 2048 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4096
¶
-
4096 RNG clock cycles per internal RNG clock RNG 4096 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8192
¶
-
8192 RNG clock cycles per internal RNG clock RNG 8192 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16384
¶
-
16384 RNG clock cycles per internal RNG clock RNG 16384 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32768
¶
-
32768 RNG clock cycles per internal RNG clock RNG 32768 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
¶
-
enum
hal_rng_standard_t
¶
-
RNG NIST compliance.
Values:
-
enumerator
HAL_RNG_CUSTOM
¶
-
Custom NIST configuration RNG custom configuration
-
enumerator
HAL_RNG_NIST
¶
-
Default NIST compliant configuration RNG NIST compliant configuration
-
enumerator
HAL_RNG_CUSTOM
¶
-
enum
hal_rng_htcr_idx_t
¶
-
RNG Additional health test index.
Values:
-
enumerator
HAL_RNG_HTCR1
¶
-
Additional health test register HTCR1 RNG Additional health test 1
-
enumerator
HAL_RNG_HTCR2
¶
-
Additional health test register HTCR2 RNG Additional health test 2
-
enumerator
HAL_RNG_HTCR3
¶
-
Additional health test register HTCR3 RNG Additional health test 3
-
enumerator
HAL_RNG_HTCR1
¶
-
struct
hal_rng_handle_s
¶
-
#include <stm32c5xx_hal_rng.h>
RNG handle structure definition.
Public Members
-
volatile
hal_rng_state_t
global_state
¶
-
RNG global state
-
uint32_t
*
p_data
¶
-
RNG pointer to data buffer
-
volatile
uint32_t
count
¶
-
RNG random number generation counter
-
volatile
uint32_t
last_error_codes
¶
-
RNG last error codes
-
hal_rng_cb_t
p_generation_cplt_cb
¶
-
RNG random number generation callback
-
hal_rng_cb_t
p_error_cb
¶
-
RNG error callback
-
const
void
*
p_user_data
¶
-
RNG user data
-
volatile
hal_rng_state_t
global_state
¶
-
struct
hal_rng_noise_source_t
¶
-
#include <stm32c5xx_hal_rng.h>
RNG noise source structure definition.
Public Members
-
uint8_t
osc_1_src
¶
-
Oscillator noise source 1. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_2_src
¶
-
Oscillator noise source 2. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_3_src
¶
-
Oscillator noise source 3. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_1_src
¶
-
struct
hal_rng_config_t
¶
-
#include <stm32c5xx_hal_rng.h>
RNG configuration structure definition.
Public Members
-
uint32_t
config_1
¶
-
Config1 must be a value between 0 and 0x3F
-
uint32_t
config_2
¶
-
Config2 must be a value between 0 and 0x7
-
uint32_t
config_3
¶
-
Config3 must be a value between 0 and 0xF
-
uint32_t
health_test
¶
-
RNG health test
-
hal_rng_clock_divider_t
clock_divider
¶
-
Clock divider factor
-
hal_rng_standard_t
standard
¶
-
NIST compliance
-
hal_rng_clock_error_detection_status_t
clock_error_detection
¶
-
clock error detection
-
hal_rng_noise_source_t
noise_src
¶
-
noise source
-
uint32_t
config_1
¶
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t
¶
- group RNG_Exported_Types
-
Typedefs
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t
-
RNG Handle Type Definition
-
typedef
void
(
*
hal_rng_cb_t
)
(
hal_rng_handle_t
*
hrng
)
-
Pointer to an RNG callback function.
Enums
-
enum
hal_rng_t
-
RNG instance.
Values:
-
enumerator
HAL_RNG
-
RNG instance
-
enumerator
HAL_RNG
-
enum
hal_rng_state_t
-
RNG global state.
Values:
-
enumerator
HAL_RNG_STATE_RESET
-
RNG not yet initialized
-
enumerator
HAL_RNG_STATE_INIT
-
RNG initialized and not yet configured
-
enumerator
HAL_RNG_STATE_IDLE
-
RNG initialized and configured
-
enumerator
HAL_RNG_STATE_ACTIVE
-
RNG random number generation is ongoing
-
enumerator
HAL_RNG_STATE_ERROR
-
RNG seed error is detected
-
enumerator
HAL_RNG_STATE_RESET
-
enum
hal_rng_clock_error_detection_status_t
-
RNG clock error detection state.
Values:
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
-
Clock error detection enabled RNG clock error detection enabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_DISABLED
-
0x00000020 Clock error detection Clock error detection disabled RNG clock error detection disabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
-
enum
hal_rng_clock_divider_t
-
RNG clock divider.
Values:
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
-
No clock division RNG 1 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2
-
2 RNG clock cycles per internal RNG clock RNG 2 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4
-
4 RNG clock cycles per internal RNG clock RNG 4 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8
-
8 RNG clock cycles per internal RNG clock RNG 8 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16
-
16 RNG clock cycles per internal RNG clock RNG 16 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32
-
32 RNG clock cycles per internal RNG clock RNG 32 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_64
-
64 RNG clock cycles per internal RNG clock RNG 64 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_128
-
128 RNG clock cycles per internal RNG clock RNG 128 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_256
-
256 RNG clock cycles per internal RNG clock RNG 256 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_512
-
512 RNG clock cycles per internal RNG clock RNG 512 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1024
-
1024 RNG clock cycles per internal RNG clock RNG 1024 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2048
-
2048 RNG clock cycles per internal RNG clock RNG 2048 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4096
-
4096 RNG clock cycles per internal RNG clock RNG 4096 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8192
-
8192 RNG clock cycles per internal RNG clock RNG 8192 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16384
-
16384 RNG clock cycles per internal RNG clock RNG 16384 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32768
-
32768 RNG clock cycles per internal RNG clock RNG 32768 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
-
enum
hal_rng_standard_t
-
RNG NIST compliance.
Values:
-
enumerator
HAL_RNG_CUSTOM
-
Custom NIST configuration RNG custom configuration
-
enumerator
HAL_RNG_NIST
-
Default NIST compliant configuration RNG NIST compliant configuration
-
enumerator
HAL_RNG_CUSTOM
-
enum
hal_rng_htcr_idx_t
-
RNG Additional health test index.
Values:
-
enumerator
HAL_RNG_HTCR1
-
Additional health test register HTCR1 RNG Additional health test 1
-
enumerator
HAL_RNG_HTCR2
-
Additional health test register HTCR2 RNG Additional health test 2
-
enumerator
HAL_RNG_HTCR3
-
Additional health test register HTCR3 RNG Additional health test 3
-
enumerator
HAL_RNG_HTCR1
-
enum
hal_rng_auto_reset_status_t
-
RNG automatic reset state.
Values:
-
enumerator
HAL_RNG_AUTO_RESET_ENABLED
-
RNG enable automatic reset after seed error
-
enumerator
HAL_RNG_AUTO_RESET_DISABLED
-
RNG disable automatic reset after seed error
-
enumerator
HAL_RNG_AUTO_RESET_ENABLED
-
enum
hal_rng_lock_config_status_t
-
RNG lock configuration state.
Values:
-
enumerator
HAL_RNG_LOCK_CONFIG_ENABLED
-
RNG lock configuration enabled
-
enumerator
HAL_RNG_LOCK_CONFIG_DISABLED
-
RNG lock configuration disabled
-
enumerator
HAL_RNG_LOCK_CONFIG_ENABLED
-
struct
hal_rng_handle_s
-
#include <stm32c5xx_hal_rng.h>
RNG handle structure definition.
Public Members
-
hal_rng_t
instance
-
RNG instance
-
volatile
hal_rng_state_t
global_state
-
RNG global state
-
uint32_t
*
p_data
-
RNG pointer to data buffer
-
volatile
uint32_t
count
-
RNG random number generation counter
-
volatile
uint32_t
last_error_codes
-
RNG last error codes
-
hal_rng_cb_t
p_generation_cplt_cb
-
RNG random number generation callback
-
hal_rng_cb_t
p_error_cb
-
RNG error callback
-
const
void
*
p_user_data
-
RNG user data
-
hal_rng_t
instance
-
struct
hal_rng_noise_source_t
-
#include <stm32c5xx_hal_rng.h>
RNG noise source structure definition.
Public Members
-
uint8_t
osc_1_src
-
Oscillator noise source 1. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_2_src
-
Oscillator noise source 2. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_3_src
-
Oscillator noise source 3. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_1_src
-
struct
hal_rng_config_t
-
#include <stm32c5xx_hal_rng.h>
RNG configuration structure definition.
Public Members
-
uint32_t
config_1
-
Config1 must be a value between 0 and 0x3F
-
uint32_t
config_2
-
Config2 must be a value between 0 and 0x7
-
uint32_t
config_3
-
Config3 must be a value between 0 and 0xF
-
uint32_t
health_test
-
RNG health test
-
hal_rng_clock_divider_t
clock_divider
-
Clock divider factor
-
hal_rng_standard_t
standard
-
NIST compliance
-
hal_rng_clock_error_detection_status_t
clock_error_detection
-
clock error detection
-
hal_rng_noise_source_t
noise_src
-
noise source
-
uint32_t
config_1
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t
- group RNG_Exported_Types
-
Typedefs
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t
-
RNG Handle Type Definition
-
typedef
void
(
*
hal_rng_cb_t
)
(
hal_rng_handle_t
*
hrng
)
-
Pointer to an RNG callback function.
Enums
-
enum
hal_rng_t
-
RNG instance.
Values:
-
enumerator
HAL_RNG
-
RNG instance
-
enumerator
HAL_RNG
-
enum
hal_rng_state_t
-
RNG global state.
Values:
-
enumerator
HAL_RNG_STATE_RESET
-
RNG not yet initialized
-
enumerator
HAL_RNG_STATE_INIT
-
RNG initialized and not yet configured
-
enumerator
HAL_RNG_STATE_IDLE
-
RNG initialized and configured
-
enumerator
HAL_RNG_STATE_ACTIVE
-
RNG random number generation is ongoing
-
enumerator
HAL_RNG_STATE_ERROR
-
RNG seed error is detected
-
enumerator
HAL_RNG_STATE_RESET
-
enum
hal_rng_clock_error_detection_status_t
-
RNG clock error detection state.
Values:
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
-
Clock error detection enabled RNG clock error detection enabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_DISABLED
-
0x00000020 Clock error detection Clock error detection disabled RNG clock error detection disabled
-
enumerator
HAL_RNG_CLOCK_ERROR_DETECTION_ENABLED
-
enum
hal_rng_clock_divider_t
-
RNG clock divider.
Values:
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
-
No clock division RNG 1 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2
-
2 RNG clock cycles per internal RNG clock RNG 2 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4
-
4 RNG clock cycles per internal RNG clock RNG 4 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8
-
8 RNG clock cycles per internal RNG clock RNG 8 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16
-
16 RNG clock cycles per internal RNG clock RNG 16 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32
-
32 RNG clock cycles per internal RNG clock RNG 32 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_64
-
64 RNG clock cycles per internal RNG clock RNG 64 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_128
-
128 RNG clock cycles per internal RNG clock RNG 128 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_256
-
256 RNG clock cycles per internal RNG clock RNG 256 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_512
-
512 RNG clock cycles per internal RNG clock RNG 512 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1024
-
1024 RNG clock cycles per internal RNG clock RNG 1024 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_2048
-
2048 RNG clock cycles per internal RNG clock RNG 2048 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_4096
-
4096 RNG clock cycles per internal RNG clock RNG 4096 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_8192
-
8192 RNG clock cycles per internal RNG clock RNG 8192 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_16384
-
16384 RNG clock cycles per internal RNG clock RNG 16384 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_32768
-
32768 RNG clock cycles per internal RNG clock RNG 32768 clock cycles per internal clock
-
enumerator
HAL_RNG_CLOCK_DIVIDER_BY_1
-
enum
hal_rng_standard_t
-
RNG NIST compliance.
Values:
-
enumerator
HAL_RNG_CUSTOM
-
Custom NIST configuration RNG custom configuration
-
enumerator
HAL_RNG_NIST
-
Default NIST compliant configuration RNG NIST compliant configuration
-
enumerator
HAL_RNG_CUSTOM
-
enum
hal_rng_htcr_idx_t
-
RNG Additional health test index.
Values:
-
enumerator
HAL_RNG_HTCR1
-
Additional health test register HTCR1 RNG Additional health test 1
-
enumerator
HAL_RNG_HTCR2
-
Additional health test register HTCR2 RNG Additional health test 2
-
enumerator
HAL_RNG_HTCR3
-
Additional health test register HTCR3 RNG Additional health test 3
-
enumerator
HAL_RNG_HTCR1
-
enum
hal_rng_auto_reset_status_t
-
RNG automatic reset state.
Values:
-
enumerator
HAL_RNG_AUTO_RESET_ENABLED
-
RNG enable automatic reset after seed error
-
enumerator
HAL_RNG_AUTO_RESET_DISABLED
-
RNG disable automatic reset after seed error
-
enumerator
HAL_RNG_AUTO_RESET_ENABLED
-
enum
hal_rng_lock_config_status_t
-
RNG lock configuration state.
Values:
-
enumerator
HAL_RNG_LOCK_CONFIG_ENABLED
-
RNG lock configuration enabled
-
enumerator
HAL_RNG_LOCK_CONFIG_DISABLED
-
RNG lock configuration disabled
-
enumerator
HAL_RNG_LOCK_CONFIG_ENABLED
-
struct
hal_rng_handle_s
-
#include <stm32c5xx_hal_rng.h>
RNG handle structure definition.
Public Members
-
hal_rng_t
instance
-
RNG instance
-
volatile
hal_rng_state_t
global_state
-
RNG global state
-
uint32_t
*
p_data
-
RNG pointer to data buffer
-
volatile
uint32_t
count
-
RNG random number generation counter
-
volatile
uint32_t
last_error_codes
-
RNG last error codes
-
hal_rng_cb_t
p_generation_cplt_cb
-
RNG random number generation callback
-
hal_rng_cb_t
p_error_cb
-
RNG error callback
-
const
void
*
p_user_data
-
RNG user data
-
hal_rng_t
instance
-
struct
hal_rng_noise_source_t
-
#include <stm32c5xx_hal_rng.h>
RNG noise source structure definition.
Public Members
-
uint8_t
osc_1_src
-
Oscillator noise source 1. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_2_src
-
Oscillator noise source 2. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_3_src
-
Oscillator noise source 3. This parameter can be a combination of value described in Noise Source Port
-
uint8_t
osc_1_src
-
struct
hal_rng_config_t
-
#include <stm32c5xx_hal_rng.h>
RNG configuration structure definition.
Public Members
-
uint32_t
config_1
-
Config1 must be a value between 0 and 0x3F
-
uint32_t
config_2
-
Config2 must be a value between 0 and 0x7
-
uint32_t
config_3
-
Config3 must be a value between 0 and 0xF
-
uint32_t
health_test
-
RNG health test
-
hal_rng_clock_divider_t
clock_divider
-
Clock divider factor
-
hal_rng_standard_t
standard
-
NIST compliance
-
hal_rng_clock_error_detection_status_t
clock_error_detection
-
clock error detection
-
hal_rng_noise_source_t
noise_src
-
noise source
-
uint32_t
config_1
-
typedef
struct
hal_rng_handle_s
hal_rng_handle_t